home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Dialogs.h
-
- Copyright: © 1983-1993 by Apple Computer, Inc.
- All rights reserved.
-
- Version: System 7.1 for ETO #11
- Created: Tuesday, March 30, 1993 18:00
-
- */
-
- #ifndef __DIALOGS__
- #define __DIALOGS__
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
-
- #ifndef __TEXTEDIT__
- #include <TextEdit.h>
- #endif
-
-
- enum {
-
- ctrlItem = 4,
- btnCtrl = 0,
- chkCtrl = 1,
- radCtrl = 2,
- resCtrl = 3,
- statText = 8,
- editText = 16,
- iconItem = 32,
- picItem = 64,
- userItem = 0,
- itemDisable = 128,
- ok = 1,
- cancel = 2,
- stopIcon = 0,
- noteIcon = 1,
- cautionIcon = 2
- };
-
- /* Dialog Item List Manipulation Constants */
- typedef short DITLMethod;
-
- enum {
-
- overlayDITL = 0,
- appendDITLRight = 1,
- appendDITLBottom = 2
- };
-
- typedef short StageList;
-
-
- typedef WindowPtr DialogPtr;
- typedef pascal void (*ResumeProcPtr)(void);
- typedef pascal void (*SoundProcPtr)(void);
- typedef pascal Boolean (*ModalFilterProcPtr)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit);
-
- struct DialogRecord {
- WindowRecord window;
- Handle items;
- TEHandle textH;
- short editField;
- short editOpen;
- short aDefItem;
- };
-
- typedef struct DialogRecord DialogRecord;
- typedef DialogRecord *DialogPeek;
-
- struct DialogTemplate {
- Rect boundsRect;
- short procID;
- Boolean visible;
- Boolean filler1;
- Boolean goAwayFlag;
- Boolean filler2;
- long refCon;
- short itemsID;
- Str255 title;
- };
-
- typedef struct DialogTemplate DialogTemplate;
- typedef DialogTemplate *DialogTPtr, **DialogTHndl;
-
- struct AlertTemplate {
- Rect boundsRect;
- short itemsID;
- StageList stages;
- };
-
- typedef struct AlertTemplate AlertTemplate;
- typedef AlertTemplate *AlertTPtr, **AlertTHndl;
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- pascal void InitDialogs(ResumeProcPtr resumeProc)
- = 0xA97B;
- pascal void ErrorSound(SoundProcPtr soundProc)
- = 0xA98C;
- pascal DialogPtr NewDialog(void *wStorage,const Rect *boundsRect,ConstStr255Param title,
- Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
- Handle itmLstHndl)
- = 0xA97D;
- DialogPtr newdialog(void *wStorage,const Rect *boundsRect,char *title,Boolean visible,
- short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,Handle itmLstHndl);
- pascal DialogPtr GetNewDialog(short dialogID,void *dStorage,WindowPtr behind)
- = 0xA97C;
- pascal void CloseDialog(DialogPtr theDialog)
- = 0xA982;
- pascal void DisposDialog(DialogPtr theDialog)
- = 0xA983;
- pascal void DisposeDialog(DialogPtr theDialog)
- = 0xA983;
- pascal void ParamText(ConstStr255Param param0,ConstStr255Param param1,ConstStr255Param param2,
- ConstStr255Param param3)
- = 0xA98B;
- pascal void ModalDialog(ModalFilterProcPtr filterProc,short *itemHit)
- = 0xA991;
- pascal Boolean IsDialogEvent(const EventRecord *theEvent)
- = 0xA97F;
- pascal Boolean DialogSelect(const EventRecord *theEvent,DialogPtr *theDialog,
- short *itemHit)
- = 0xA980;
- pascal void DrawDialog(DialogPtr theDialog)
- = 0xA981;
- pascal void UpdateDialog(DialogPtr theDialog,RgnHandle updateRgn)
- = 0xA978;
- pascal void UpdtDialog(DialogPtr theDialog,RgnHandle updateRgn)
- = 0xA978;
- pascal short Alert(short alertID,ModalFilterProcPtr filterProc)
- = 0xA985;
- pascal short StopAlert(short alertID,ModalFilterProcPtr filterProc)
- = 0xA986;
- pascal short NoteAlert(short alertID,ModalFilterProcPtr filterProc)
- = 0xA987;
- pascal short CautionAlert(short alertID,ModalFilterProcPtr filterProc)
- = 0xA988;
- pascal void GetDialogItem(DialogPtr theDialog,short itemNo,short *itemType,Handle *item,
- Rect *box)
- = 0xA98D;
- pascal void GetDItem(DialogPtr theDialog,short itemNo,short *itemType,Handle *item,
- Rect *box)
- = 0xA98D;
- pascal void SetDialogItem(DialogPtr theDialog,short itemNo,short itemType,Handle item,
- const Rect *box)
- = 0xA98E;
- pascal void SetDItem(DialogPtr theDialog,short itemNo,short itemType,Handle item,
- const Rect *box)
- = 0xA98E;
- pascal void HideDialogItem(DialogPtr theDialog,short itemNo)
- = 0xA827;
- pascal void HideDItem(DialogPtr theDialog,short itemNo)
- = 0xA827;
- pascal void ShowDialogItem(DialogPtr theDialog,short itemNo)
- = 0xA828;
- pascal void ShowDItem(DialogPtr theDialog,short itemNo)
- = 0xA828;
- pascal void SelectDialogItemText(DialogPtr theDialog,short itemNo,short strtSel,short endSel)
- = 0xA97E;
- pascal void SelIText(DialogPtr theDialog,short itemNo,short strtSel,short endSel)
- = 0xA97E;
- pascal void GetDialogItemText(Handle item,Str255 text)
- = 0xA990;
- pascal void GetIText(Handle item,Str255 text)
- = 0xA990;
- pascal void SetDialogItemText(Handle item,ConstStr255Param text)
- = 0xA98F;
- pascal void SetIText(Handle item,ConstStr255Param text)
- = 0xA98F;
- pascal short FindDialogItem(DialogPtr theDialog,Point thePt)
- = 0xA984;
- pascal short FindDItem(DialogPtr theDialog,Point thePt)
- = 0xA984;
- pascal DialogPtr NewColorDialog(void *dStorage,const Rect *boundsRect,ConstStr255Param title,
- Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
- Handle items)
- = 0xAA4B;
- pascal DialogPtr NewCDialog(void *dStorage,const Rect *boundsRect,ConstStr255Param title,
- Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
- Handle items)
- = 0xAA4B;
- DialogPtr newcolordialog(void *dStorage,const Rect *boundsRect,char *title,
- Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
- Handle items);
- DialogPtr newcdialog(void *dStorage,const Rect *boundsRect,char *title,
- Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
- Handle items);
- #define GetAlertStage() (* (short*) 0x0A9A)
- #define GetAlrtStage() (* (short*) 0x0A9A)
- pascal void ResetAlertStage(void)
- = {0x4278,0x0A9A};
- pascal void ResetAlrtStage(void)
- = {0x4278,0x0A9A};
- pascal void DialogCut(DialogPtr theDialog);
- pascal void DlgCut(DialogPtr theDialog);
- pascal void DialogPaste(DialogPtr theDialog);
- pascal void DlgPaste(DialogPtr theDialog);
- pascal void DialogCopy(DialogPtr theDialog);
- pascal void DlgCopy(DialogPtr theDialog);
- pascal void DialogDelete(DialogPtr theDialog);
- pascal void DlgDelete(DialogPtr theDialog);
- pascal void SetDialogFont(short fontNum)
- = {0x31DF,0x0AFA};
- pascal void SetDAFont(short fontNum)
- = {0x31DF,0x0AFA};
- void paramtext(char *param0,char *param1,char *param2,char *param3);
- void getdialogitemtext(Handle item,char *text);
- void getitext(Handle item,char *text);
- void setdialogitemtext(Handle item,char *text);
- void setitext(Handle item,char *text);
- short finddialogitem(DialogPtr theDialog,Point *thePt);
- short findditem(DialogPtr theDialog,Point *thePt);
-
- pascal void AppendDITL(DialogPtr theDialog,Handle theHandle,DITLMethod method);
- pascal short CountDITL(DialogPtr theDialog);
- pascal void ShortenDITL(DialogPtr theDialog,short numberItems);
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-